<?php 
	$check_cookie = check_cookie();
	define('CHECKCOOKIE',$check_cookie);
	require_once('configuration.php');
	require_once('module/index.php');
	require_once('component/index.php');
	$template = 'simple';
	$template_path = BASEURL.'/template/'.$template;
	include_once('template/'.$template.'/index.php');
?>
<?php 
	//Check cookie
	function check_cookie()
	{
		$cookie_name = "cip_post_hit".$_GET['id'];
		//Get cookie
		$cookie = null;
		if (isset($_COOKIE[$cookie_name])) {
			$cookie = $_COOKIE[$cookie_name];
		}
		//Cookie expire
		if ($cookie == null) {
			$cookie_expire = time() + (60*45);
			@setcookie($cookie_name ,'exist', $cookie_expire);
			return false;
		}
		else
			return true;
	}
?>